<template>
  <div class="search" :style="style">
    <a-input
      class="search_input"
      :style="inputStyle"
      :placeholder="contentSetting.placeholder"
      disabled
    />
  </div>
</template>
<script>
export default {
  props: {
    //组件的ID
    id: {
      required: true,
    },
    // 组件的样式
    styleSetting: {
      type: Object,
      default: () => {
        return {};
      },
    },
    // 组件的内容
    contentSetting: {
      type: Object,
      default: () => {
        return {
          placeholder: "请输入搜索内容",
        };
      },
    },
  },
  data() {
    return {
      placeholder: "请输入你要搜索的内容",
    };
  },
  computed: {
    style: function () {
      let styles = `margin-top:${this.styleSetting.marginTop};margin-bottom:${this.styleSetting.marginBottom}`;
      return styles;
    },
    inputStyle() {
      let style = `border-radius:${this.styleSetting.borderRadius};text-align: ${this.styleSetting.textAlign};`;
      return style;
    },
  },
};
</script>
<style lang="scss" scoped>
.search {
  padding: 15px;
  .search_input {
    border-radius: 0;
    background: #f8f8f8;
    border: none;
  }
}
</style>